package script

import (
	"game/core"
	_ "image/jpeg"

	"github.com/hajimehoshi/ebiten/v2"
	"github.com/solarlune/resolv"
)

type Bg struct {
	core.Sprite
}

func NewBg() *Bg {

	return &Bg{
		Sprite: core.Sprite{
			Position: &resolv.Vector{X: 0, Y: 0},
			Image:    BgImg,
		},
	}
}

func (bg *Bg) Update(dt float64) error {
	return nil
}

func (bg *Bg) Draw(screen *ebiten.Image) {
	op := &ebiten.DrawImageOptions{}
	op.GeoM.Translate(bg.Position.X, bg.Position.Y)
	screen.DrawImage(bg.Image, op)
}
